////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include "Tools/GLHeaders.hpp"
#include <iostream>
#include <cstdlib>

#include "Global.hpp"
#include "Glut/ReshapeFunc.hpp"
#include "Glut/DisplayFunc.hpp"
#include "Glut/IdleFunc.hpp"
#include "Glut/InitGLFunc.hpp"
//Peripheric Event
#include "Glut/Keyboard.hpp"
#include "Glut/Special.hpp"
#include "Glut/Mouse.hpp"
#include "Glut/Motion.hpp"
////////////////////////////////////////////////////////////
/// Entry point of application
////////////////////////////////////////////////////////////
int main(int argc, char** argv){
	GlobalInit();
	glutInit(&argc, argv);  
	glutInitDisplayMode(GLUT_RGBA|GLUT_ALPHA|GLUT_DOUBLE|GLUT_DEPTH);  
	glutInitWindowSize(width, height);  
	glutInitWindowPosition(leftPosition, topPosition);  
	windowID = glutCreateWindow(name);  

	glewInit();
	glutReshapeFunc(&ReSizeGLScene);
	glutDisplayFunc(&DrawGLScene);  
	glutIdleFunc(&SleepGLScene);
	if(fullscreen)
		glutFullScreen();
	glutKeyboardFunc(&Keyboard);
	glutKeyboardUpFunc(&KeyboardUp);

	glutSpecialFunc(&Special);
	glutSpecialUpFunc(&SpecialUp);

	glutMouseFunc(&Mouse);
	glutMotionFunc(&Motion);
	glutPassiveMotionFunc(&PassiveMotion);

	InitGL(width, height);
	glutMainLoop();
	return EXIT_SUCCESS;
}
